home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Softdisk Supreme
/
Softdisk Supreme.iso
/
pc
/
DSK Files
/
0-49
/
SD008b.dsk
/
EXECUMATIC.bas
< prev
next >
Wrap
BASIC Source File
|
2003-06-12
|
5KB
|
149 lines
100 HOME
200 D$ = CHR$(4)
300 Q$ = CHR$(34)
400 FILE = 0
500 S = 1
1000 DIM A$(1000)
1010 REM GOSUB 8900: REM ** INIT ARRAY NO LONGER USED **
1090 HTAB 15: INVERSE
1100 PRINT "EXECUMATIC": NORMAL : PRINT
1200 GOSUB 9500: REM ** INTRO **:PRINT
1300 GOSUB 9000: REM ** CMD LIST **
1350 REM *****HERE IS WHERE WORK GETS DONE ****
1400 FOR X = S TO 1000
1500 INPUT "CMD>";I$
1510 IF I$ = "VONN" THEN V = 1:X = X -1: GOTO 2100
1520 IF I$ = "VOFF" THEN V = 0:X = X -1: GOTO 2100
1530 IF I$ = "LOOK" THEN GOSUB 8000:X = X -1: GOTO 2100
1535 IF I$ = "HARD" THEN PR# 1: GOSUB 8000:X = X -1: GOTO 2100
1540 IF I$ = "DROP" THEN GOSUB 8500: GOTO 2100
1550 IF I$ = "OOPS" THEN GOSUB 8700: GOTO 2100
1600 IF I$ = "QUIT" THEN GOTO 5000
1610 IF I$ = "HELP" THEN GOSUB 9000:X = X -1: GOTO 2100
1612 IF I$ = "WAIT" THEN FOR A = 1 TO 2000: NEXT A:X = X -1: GOTO 2100
1615 IF I$ = "GRAB" THEN GOSUB 6000: GOTO 2100
1620 IF I$ = "DONE" THEN GOTO 4000
1630 IF I$ = "OVER" THEN S = 1: GOTO 1400
1680 IF V = 0 THEN GOTO 2050
1690 HTAB 20
1700 INPUT "VERIFY WITH 'Y'";V$
2000 IF V$ < >"Y" THEN X = X -1: GOTO 1500
2050 A$(X) = I$
2100 NEXT X
4000 REM ***** PUT EXEC TO DISK *****
4010 INPUT "RETURN TO EXECUMATIC (Y/N) ";R$
4020 IF R$ = "Y" THEN A$(X) = "RUN EXECUMATIC ": GOTO 4100
4090 X = X -1
4100 INPUT "ENTER EXEC FILE NAME ";E$
4120 HOME
4150 PRINT "WRITING EXEC FILE ";E$
4190 PRINT D$;"MON C,I,O"
4200 PRINT D$;"OPEN ";E$
4210 PRINT D$;"WRITE ";E$
4300 FOR Y = 1 TO X
4400 PRINT A$(Y)
4500 NEXT Y
4600 PRINT D$;"CLOSE ";E$
4700 VTAB 22: PRINT "REVIEW THEN PRESS ";: INVERSE : PRINT "RETURN";: NORMAL
4710 INPUT R$
4800 FILE = 1
5000 HOME : REM ******END END END ******
5005 IF FILE = 0 THEN GOTO 5100
5010 PRINT "WANT TO TRY ";E$;" (Y/N) ";
5015 INPUT T$
5020 IF T$ = "Y" THEN PRINT D$;"EXEC ";E$
5100 VTAB 8
5110 PRINT "PATRICK B. MONTANARO"
5120 PRINT "64 REED DRIVE"
5130 PRINT "WETHERSFIELD CT. 06109"
5135 PRINT
5140 PRINT "PHONE (203) 529 1678"
5200 VTAB 22: END
6000 REM *** LOAD TEXT FROM DISK ***
6010 IF X = 1 GOTO 6100
6020 INPUT "WORK FILE NOT EMPTY - OVERLAY (Y/N) ";O$
6030 IF O$ = "N" THEN X = X -1: RETURN
6040 IF O$ < >"Y" THEN GOTO 6020
6050 X = 1
6100 INPUT "ENTER TEXT FILE NAME ";T$
6120 PRINT "READING TEXT FILE"
6200 PRINT D$;"NOMON C,I,O"
6210 PRINT D$;"OPEN ";T$
6220 PRINT D$;"READ ";T$
6221 ONERR GOTO 6300
6225 FOR X = 1 TO 1000
6230 INPUT A$(X)
6250 NEXT X
6300 POKE 216,0
6310 PRINT "READING COMPLETE - CODE "; PEEK(222)
6320 ONERR GOTO 6400
6350 PRINT D$;"CLOSE ";T$
6400 POKE 216,O
6410 PRINT "CLOSING FILE - CODE "; PEEK(222)
6420 S = X
6430 GOSUB 9000: REM HELP
6440 GOSUB 8000: REM LIST
6900 GOTO 1400
7000 REM *** DASHES ***
7005 FOR Y = 1 TO 38: HTAB Y: PRINT "-";: NEXT Y: HTAB 39: PRINT "-"
7010 RETURN
8000 REM ***
8050 REM *** LIST ***
8075 GOSUB 7000
8080 IF X = 1 THEN PRINT "NO INPUT ON FILE ": GOTO 8125
8100 FOR Y = 1 TO X -1
8110 PRINT Y;") ";A$(Y)
8120 NEXT Y
8125 GOSUB 7000
8128 PR# 0
8130 RETURN
8500 REM *** DELETE ***
8510 INPUT "ENTER # TO DELETE (0 EXITS) ";E
8511 IF E <0 THEN PRINT "IF YOU BREAK IT YOU HAVE TO FIX IT !!": GOTO 8510
8512 IF E >X THEN PRINT "YOUR NUMBEHAT EXISTS": GOTO 8NUMBER IS GREATER THAN WHAT EXISTS": GOTO 8510
8513 IF E = 0 THEN X = X -1: GOTO 8560
8520 FOR Y = E TO X
8530 A$(Y) = A$(Y +1)
8540 NEXT Y
8550 X = X -2: REM (ONE FOR CMD AND ONE FOR DEL)
8560 RETURN
8700 REM *** INSERT LINE ***
8710 INPUT "ENTER # TO INSERT AFTER (0 EXITS) ";E
8711 IF E <0 THEN PRINT "CURIOSITY KILLED THE KA'AT !!": GOTO 8710
8712 IF E >X -1 THEN PRINT "OUT OF RANGE - USE NORMAL MODE": GOTO 8710
8713 IF E = 0 THEN X = X -1: GOTO 8790
8720 FOR Y = X -1 TO E +1 STEP -1
8730 A$(Y +1) = A$(Y)
8740 NEXT Y
8750 INPUT "INP>";I$
8760 A$(E +1) = I$
8790 RETURN
8900 REM ** INIT ARRAY **
8910 FOR Y = 1 TO 1000
8920 A$(Y) = CHR$(6)
8930 NEXT Y
8990 RETURN
9000 REM ***** CMD LIST *****
9100 GOSUB 7000
9200 PRINT "'LOOK' - LIST WORK FILE"
9210 PRINT "'HARD' - PRINT WORK FILE"
9300 PRINT "'QUIT' - DO NOT SAVE ON DISK"
9305 PRINT "'VONN' - VERIFY MODE"
9306 PRINT "'VOFF' - END VERIFY"
9308 PRINT "'GRAB' - LOAD TEXT FILE FROM DISK"
9310 PRINT "'DONE' - WRITE WORK FILE TO DISK"
9312 PRINT "'OVER' - CLEAR WORK AREA AND RESTART"
9315 PRINT "'DROP' - DELETE A LINE"
9317 PRINT "'OOPS' - INSERT A LINE"
9320 PRINT "'";: INVERSE : PRINT "HELP";: NORMAL
9330 PRINT "' - LIST THESE COMMANDS "
9390 GOSUB 7000
9399 RETURN
9500 PRINT "EXECUMATIC WILL ALLOW YOU TO ENTER"
9510 PRINT "COMMANDS, INSTRUCTIONS, ETC. (WHATEVER "
9520 PRINT "CAN GO INTO AN EXEC FILE) FREEFORM AND"
9525 PRINT "WHEN DONE EXECUMATIC WILL TAKE YOUR "
9530 PRINT "INPUTS, BUILD A TEXT FILE AND ASK IF "
9540 PRINT "YOU WOULD LIKE TO TRY (EXEC) IT."
9550 PRINT "BASIC MAINTANENCE COMMANDS FOLLOW : "
9900 RETURN